$webwork.htmlEncode($page.space.name) : Common Query Language (CQL) Tutorial (unfinished)
This page last changed on Jun 25, 2007 by cholmes.
IntroductionCQL stands for Common Query Language, I believe it originated with the library of congress, it: CQL tries to combine simplicity and intuitiveness of expression for simple, every day queries, with the richness of more expressive languages to accommodate complex concepts when necessary. The OGC then extended it for spatial queries, specifying it in their Catalog 2.0 spec. The full BNF syntax is also detailed at: GEOTOOLS:CQL Parser Design. At GeoServer we've ported it to also be used in WFS and WMS, as it's a nice intuitive and powerful way of specifying how to filter data. It can be included in any WMS request, and will only display the features that match the CQL filter. Or in a WFS request it can replace the normal Filter (which is normal a bunch of XML) to tell which raw data to fetch. This tutorial will walk through several examples of to use CQL, and hopefully raise it's profile a bit. We've had it available in GeoServer since version 1.5.0-RC1. QueriesTODO point in random road point in washington square park: Streets that cross a line near my office. populations over 8 million landmarks in a bbox near my apartment This seems to be a well formed filter, it shows up fine in GeoServer, but it's getting the same complaint as when we don't have the name right: ErrorsUnfortunately error reporting is quite poor right now. I've opened a bug for this: http://jira.codehaus.org/browse/GEOS-1062 Basically if you get a 'transformer error' it's likely that you've used an attribute name that is not in the feature type you requested. Check the spelling, and the DescribeFeatureType response to make sure it's there. If you turn verbose exceptions on you can look at the cause of the transformer error, and if it's a class cast exception in the PostPreProcessFilterSplittingVisitor then it's almost definitely because you specified an attribute that isn't there. |
![]() |
Document generated by Confluence on Jan 16, 2008 23:27 |